<?php

require_once("albatross.ini.php");

if ($_SESSION["password"] == $typassword || $typassword == "") {
	if (array_key_exists("kill", $tyini)) {
		echo "Killing VLC... \n";
		flush();
		echo shell_exec($tyini["kill"]);
	} else {
		$halt_stream = "http://tystreamer:".$controlpassword."@".$_SERVER["SERVER_NAME"].":";
		$halt_stream .= (array_key_exists("control_port",$tyini))?$tyini["control_port"]:"8091";
		$halt_stream .= "/halt.html?control=shutdown";
		echo file_get_contents($halt_stream);
	}
}
?>
